package com.ysyx.ysyx_message.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 乘客评价表
 * @TableName passengerreview_inf
 */
@TableName(value ="passengerreview_inf")
@Data
public class PassengerreviewPojo implements Serializable {
    /**
     * 评价编号id
     */
    @TableId(type = IdType.AUTO)
    private Integer reviewId;

    /**
     * 订单编号
     */
    private String orderId;

    /**
     * 乘客编号
     */
    private Integer passengerId;

    /**
     * 评价等级
     */
    private Integer reviewRating;

    /**
     * 评价内容
     */
    private String reviewContent;

    /**
     * 评价时间
     */
    private Date reviewTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PassengerreviewPojo other = (PassengerreviewPojo) that;
        return (this.getReviewId() == null ? other.getReviewId() == null : this.getReviewId().equals(other.getReviewId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getPassengerId() == null ? other.getPassengerId() == null : this.getPassengerId().equals(other.getPassengerId()))
            && (this.getReviewRating() == null ? other.getReviewRating() == null : this.getReviewRating().equals(other.getReviewRating()))
            && (this.getReviewContent() == null ? other.getReviewContent() == null : this.getReviewContent().equals(other.getReviewContent()))
            && (this.getReviewTime() == null ? other.getReviewTime() == null : this.getReviewTime().equals(other.getReviewTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReviewId() == null) ? 0 : getReviewId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getPassengerId() == null) ? 0 : getPassengerId().hashCode());
        result = prime * result + ((getReviewRating() == null) ? 0 : getReviewRating().hashCode());
        result = prime * result + ((getReviewContent() == null) ? 0 : getReviewContent().hashCode());
        result = prime * result + ((getReviewTime() == null) ? 0 : getReviewTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", reviewId=").append(reviewId);
        sb.append(", orderId=").append(orderId);
        sb.append(", passengerId=").append(passengerId);
        sb.append(", reviewRating=").append(reviewRating);
        sb.append(", reviewContent=").append(reviewContent);
        sb.append(", reviewTime=").append(reviewTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}